Article 9221

Title of the article

CALCULATING THE NUMBER PI USING DATA PARALLEL PROGRAMMING OpenMP 

Authors

Olga A. Bakaeva, Candidate of technical sciences, associate professor, associate professor of the sub-department of computer-aided design, National Research Ogarev Mordovia State University (68 Bolshevistskaya street, Saransk, Republic of Mordovia, Russia), E-mail: helga_rm@rambler.ru 

Index UDK

004.942 

DOI

10.21685/2227-8486-2021-2-9 

Abstract

Background. To analyze various methods for calculating the number Pi using the C ++ programming language and compare the convergence, accuracy and computation speed for these methods with and without data parallel programming.
Materials and methods. Based on the well-known mathematical expressions that are a qualitative approximation of the number Pi: the Gregory–Leibniz, Madhava, Nilakant series, Euler and Wallis formulas, the approximate value of Pi is calculated with an accuracy of 10–10 and the number of terms up to 106. The calculations are performed in the Visual Studio environment on the C ++ programming language in a standard way and using the OpenMP parallel computing technology.
Results. For each of the calculation formulas, the absolute and relative error in calculating the number Pi is found. A comparative analysis of the results obtained in Free Pascal, С ++ and С ++ using OpenMP technology is carried out.
Conclusions. The most efficient way of calculating the number Pi was revealed, taking into account the convergence of the series, the accuracy and time of calculations. 

Key words

number Pi, data parallel programming, OpenMP, Visual Studio, C ++ programming language, Gregory–Leibniz series, Madhava series, Nilakant series, Euler's formula, Wallis's formula 

 Download PDF
For citation

Bakaeva O.A. Calculating the number of Pi using data parallel programming OpenMP. Modeli, sistemy, seti v ekonomike, tekhnike, prirode i obshchestve = Models, systems, networks in econom ics, technology, nature and society . 2021;2:130–143. (In Russ.). doi:10.21685/2227-8486-2021-2-9

 

Дата создания: 15.09.2021 14:42
Дата обновления: 06.04.2022 13:59